#!/usr/bin/perl


sub tr_tmax_to_tuxedo
{
	local( $SRC_FILE ) = @_;

print "SRC_FILE : $SRC_FILE\n";

	$file_name = $SRC_FILE;
	$file_exte = $SRC_FILE;

	$file_name =~ m/\.\w*$/g;
	$file_name = $`;

	$file_exte =~ s/$file_name//g;

print "-file-name-> : $file_name\n";
print "-file_exte-> : $file_exte\n";

	$INPUT_FILE = $file_name.$file_exte;
	$OUTPUT_FILE = $file_name.'_t'.$file_exte;

	print "-INPUT_FILE -> : $INPUT_FILE\n";
	print "-OUTPUT_FILE-> : $OUTPUT_FILE\n";

	open(FILE_IN, "<$INPUT_FILE");
	open(FILE_OUT, ">$OUTPUT_FILE");

	while( $line = <FILE_IN> ) {
		chop $line;

		$line =~ s/usrinc\/atmi/atmi/;
		$line =~ s/TPSTART_T/TPINIT/g;
		$line =~ s/case	TPECLOSE/\/\/case	TPECLOSE/g;
		$line =~ s/TPRQS/TPNOFLAGS/g;
		print FILE_OUT "$line\n";
	}
}

#&tr_tmax_to_tuxedo("./TmaxCli/LibTmaxCli.c");
#&tr_tmax_to_tuxedo("./TmaxCli/LibTmaxCli_Conn.c");
#&tr_tmax_to_tuxedo("./TmaxCmn/LibTmaxCmn.c");
&tr_tmax_to_tuxedo("./TmaxSvr/LibTmaxSvr.c");
&tr_tmax_to_tuxedo("./TmaxSvr/LibTmaxUcs.c");
